<%@ page language="java" contentType="text/html; charset=utf-8"  pageEncoding="utf-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html class="no-js">
	<head>
	  <meta charset="utf-8">
	  <meta http-equiv="X-UA-Compatible" content="IE=edge">
	  <meta name="description" content="这是一个 table 页面">
	  <meta name="keywords" content="table">
	  <meta name="viewport" content="width=device-width, initial-scale=1">
	  <meta name="renderer" content="webkit">
	  <meta http-equiv="Cache-Control" content="no-siteapp" />
	  <meta name="apple-mobile-web-app-title" content="Amaze UI" />
	  <link rel="icon" type="image/png" href="${pageContext.request.contextPath}/assets/i/favicon.png">
	  <link rel="apple-touch-icon-precomposed" href="${pageContext.request.contextPath}/assets/i/app-icon72x72@2x.png">
	  <link rel="stylesheet" href="${pageContext.request.contextPath}/assets/css/amazeui.min.css"/>
	  <link rel="stylesheet" href="${pageContext.request.contextPath}/assets/css/admin.css">
	  <script type="text/javascript" src="${pageContext.request.contextPath}/js/infinitedropdown.min.js"></script>
	  <title>Amaze UI Admin table Examples</title>
	  <script type="text/javascript">
	  </script>
	</head>
	<body>
	<!--[if lte IE 9]>
	<p class="browsehappy">你正在使用<strong>过时</strong>的浏览器，Amaze UI 暂不支持。 请 <a href="http://browsehappy.com/" target="_blank">升级浏览器</a>
	  以获得更好的体验！</p>
	<![endif]-->
	
		<header class="am-topbar am-topbar-inverse admin-header">
		  <div class="am-topbar-brand">
		    <strong>Amaze UI</strong> <small>后台管理模板</small>
		  </div>
		
		  <button class="am-topbar-btn am-topbar-toggle am-btn am-btn-sm am-btn-success am-show-sm-only" data-am-collapse="{target: '#topbar-collapse'}"><span class="am-sr-only">导航切换</span> <span class="am-icon-bars"></span></button>
		
		  <div class="am-collapse am-topbar-collapse" id="topbar-collapse">
		
		    <ul class="am-nav am-nav-pills am-topbar-nav am-topbar-right admin-header-list">
		      <li><a href="javascript:;"><span class="am-icon-envelope-o"></span> 收件箱 <span class="am-badge am-badge-warning">5</span></a></li>
		      <li class="am-dropdown" data-am-dropdown>
		        <a class="am-dropdown-toggle" data-am-dropdown-toggle href="javascript:;">
		          <span class="am-icon-users"></span> 管理员 <span class="am-icon-caret-down"></span>
		        </a>
		        <ul class="am-dropdown-content">
		          <li><a href="#"><span class="am-icon-user"></span> 资料</a></li>
		          <li><a href="#"><span class="am-icon-cog"></span> 设置</a></li>
		          <li><a href="#"><span class="am-icon-power-off"></span> 退出</a></li>
		        </ul>
		      </li>
		      <li class="am-hide-sm-only"><a href="javascript:;" id="admin-fullscreen"><span class="am-icon-arrows-alt"></span> <span class="admin-fullText">开启全屏</span></a></li>
		    </ul>
		  </div>
		</header>
		<!-- add person DIV -->
		<div class="am-modal am-modal-no-btn" tabindex="-1" id="user-modal-1">
		  <div class="am-modal-dialog"></div>
		   </div> 
		  <div class="am-cf admin-main">
		  <!-- sidebar start -->
		  <div class="admin-sidebar am-offcanvas" id="admin-offcanvas">
		    <div class="am-offcanvas-bar admin-offcanvas-bar">
		      <ul class="am-list admin-sidebar-list">
		        <li><a href="admin-index.html"><span class="am-icon-home"></span> 首页</a></li>
		        <li class="admin-parent">
		          <a class="am-cf" data-am-collapse="{target: '#collapse-nav'}"><span class="am-icon-file"></span> 页面模块 <span class="am-icon-angle-right am-fr am-margin-right"></span></a>
		          <ul class="am-list am-collapse admin-sidebar-sub am-in" id="collapse-nav">
		            <li><a href="admin-user.html" class="am-cf"><span class="am-icon-check"></span> 个人资料<span class="am-icon-star am-fr am-margin-right admin-icon-yellow"></span></a></li>
		            <li><a href="admin-help.html"><span class="am-icon-puzzle-piece"></span> 帮助页</a></li>
		            <li><a href="admin-gallery.html"><span class="am-icon-th"></span> 相册页面<span class="am-badge am-badge-secondary am-margin-right am-fr">24</span></a></li>
		            <li><a href="admin-log.html"><span class="am-icon-calendar"></span> 系统日志</a></li>
		            <li><a href="admin-404.html"><span class="am-icon-bug"></span> 404</a></li>
		          </ul>
		        </li>
		        <li><a href="admin-table.html"><span class="am-icon-table"></span> 表格</a></li>
		        <li><a href="admin-form.html"><span class="am-icon-pencil-square-o"></span> 表单</a></li>
		        <li><a href="#"><span class="am-icon-sign-out"></span> 注销</a></li>
		      </ul>
		      <div class="am-panel am-panel-default admin-sidebar-panel">
		        <div class="am-panel-bd">
		          <p><span class="am-icon-bookmark"></span> 公告</p>
		          <p>公告内容 —— Amaze UI 2018-03-26</p>
		        </div>
		      </div>
		      <!-- <div class="am-panel am-panel-default admin-sidebar-panel">
		        <div class="am-panel-bd">
		          <p><span class="am-icon-tag"></span> wiki</p>
		          <p>Welcome to the Amaze UI wiki!</p>
		        </div>
		      </div> -->
		    </div>
		  </div>
		  <!-- sidebar end -->
		
		  <!-- content start -->
		  <div class="admin-content">
		    <div class="admin-content-body">
		      <div class="am-cf am-padding am-padding-bottom-0">
		        <div class="am-fl am-cf"><strong class="am-text-primary am-text-lg">人员支持组及角色</strong></div>
		      </div>
				<div>
					 <div class="am-idd">
					 </div> 	
				</div>
		      <hr>				
		      <div class="am-g am-u-sm-12">
		        <div class="am-u-sm-4" id="user_list_div">
				  	<!-- <div id="userListControl">
				    	<button class="am-btn am-btn-primary am-btn-xs"><i class="am-icon-cog"></i>创建</button>
				    	<button class="am-btn am-btn-primary am-btn-xs" onclick="userOrgRolesEdit()"><i class="am-icon-cog"></i>设置</button>
				    </div> -->
    				<div id="userListTableDiv">
    					<table border="1" style="width:100%;height:100%" class="am-table am-table-bordered" id="userListTable">
				          <tr>
				            <td>&nbsp;</td>
				            <td>&nbsp;</td>
				            <td>&nbsp;</td>
				            <td>&nbsp;</td>
				          </tr>
				        </table>
    				</div>
		        </div>
		        <div class="am-u-sm-8" id="user_list_div">
				  	<div id="userListControl">
				    	<input name="创建" type="radio" />
				        <input name="编辑" type="radio" />
				        <input type="text" id="userName" name="userName">
				        <input type="text" id="allName" name="allName">
				    </div>
				    <div class="am-u-sm-12" >
				    	<div class="am-u-sm-5" >
				    		<div>
				        		<select data-am-selected placeholder="单位选择" id="orgCompanyId" onchange="initDepartment()"></select>
				    		</div>
				    		<div>
				    			<select data-am-selected placeholder="科室选择" id="orgDepartmentId" onchange="initOffice()"></select>
				    		</div>
				        	<div>
				        		<select data-am-selected placeholder="群组选择" id="orgOfficeId" onchange="initGroup()"></select>
				        	</div>
				        	<div>
				        		<select data-am-selected placeholder="组选择" id="orgGroupId" ></select>
				        	</div>
				    	</div>
				    	<div class="am-u-sm-5" >
				    		<div>
				        		<select data-am-selected placeholder="--角色选择--" id="rolesId" ></select>
					    		<input type="hidden" name="gongsi"  class="am-form-field am-radius" placeholder="--选择角色--" >
				    		</div>
				    	</div>
				    </div>
				    <div>
				    	<button type="button" id="userRegiesterSubmit" class="am-btn am-btn-primary btn-loading-example" data-am-loading="{spinner: 'circle-o-notch', loadingText: '提交中...', resetText: '已提交'}" onclick="organizationAdding()">提交</button>
				    </div>
    				<div data-am-widget="tabs" class="am-tabs am-tabs-d2" >
				      <ul class="am-tabs-nav am-cf">
				          <li class="am-active"><a href="[data-tab-panel-0]">组织列表</a></li>
				          <li class=""><a href="[data-tab-panel-1]">角色列表</a></li>
				      </ul>
				      <div class="am-tabs-bd" id="userOrgRoleDiv">
				          <div data-tab-panel-0 class="am-tab-panel am-active" id="userOrgList"></div>
				          <div data-tab-panel-1 class="am-tab-panel " id="userOrgRoleList"></div>
				      </div>
				  </div>
		        </div>
		        <div>	
		        </div>
		      </div>
		    </div>
		  </div>
		</div>

		<a href="#" class="am-icon-btn am-icon-th-list am-show-sm-only admin-menu" data-am-offcanvas="{target: '#admin-offcanvas'}"></a>		
		<!--[if lt IE 9]>
		<script src="http://libs.baidu.com/jquery/1.11.1/jquery.min.js"></script>
		<script src="http://cdn.staticfile.org/modernizr/2.8.3/modernizr.js"></script>
		<script src="assets/js/amazeui.ie8polyfill.min.js"></script>
		<![endif]-->
		<!--[if (gte IE 9)|!(IE)]><!-->
		<script src="${pageContext.request.contextPath}/js/jquery.js"></script>
		<!--<![endif]-->
		<script src="${pageContext.request.contextPath}/assets/js/amazeui.min.js"></script>
		<script src="${pageContext.request.contextPath}/assets/js/app.js"></script>
		<script type="text/javascript">
			function organizationAdding(){
				var orgCompany = $('#orgCompanyId option:selected').text();
				var orgCompanyId = $('#orgCompanyId option:selected').val();
				var orgDepartment = $('#orgDepartmentId option:selected').text();
				var orgDepartmentId = $('#orgDepartmentId option:selected').val();
				var orgOffice = $('#orgOfficeId option:selected').text();
				var orgOfficeId = $('#orgOfficeId option:selected').val();
				var orgGroup = $('#orgGroupId option:selected').text();
				var orgGroupId = $('#orgGroupId option:selected').val();
				var rolesName = $('#rolesId option:selected').text();
				var rolesId = $('#rolesId option:selected').val();	
				var userName = $('#userName').val();	
				
				$.post("${pageContext.request.contextPath}/people/addUserOrgRole.action",
					{userName:userName,orgCompany:orgCompany,orgCompanyId:orgCompanyId,orgDepartment:orgDepartment,orgDepartmentId:orgDepartmentId,orgOffice:orgOffice,orgOfficeId:orgOfficeId,orgGroup:orgGroup,orgGroupId:orgGroupId,rolesName:rolesName,rolesId:rolesId},
					function(res){
						var re = eval("("+res+")");
						if(re.success){
							//$("#user-modal-1").modal('close');
							$("#rolesId").val()
						}else{
							alert("提交失败！请联系管理员！");
						};
					});
			}
			function openModal(){
				$("doc-modal-1").modal();
			}
			function userRegiesterModalOpen(){
				$("#user-modal-1").find('[data-am-modal-confirm]').off('click.close.modal.amui');//去掉modal的关闭事件。
				$(this).removeData('amui.modal');
				$("#user-modal-1").modal({
    				onConfirm : function(options) {
    					$.post("${pageContext.request.contextPath}/people/peopleAdd.action",data,function(res){
							var re = eval("("+res+")");
							if(re.success){
								$("#user-modal-1").modal('close');
							}else{
								alert("提交失败！请联系管理员！");
							};
						});
    				}
    			})
			}
		  	function userRegiesterAdd(){
		  		var $uRegiesterSubmit = $(this);
		  		$uRegiesterSubmit.button('loading');
				var data = $("#userRegiesterForm").serialize();
				$.post("${pageContext.request.contextPath}/people/peopleAdd.action",data,function(res){
					var re = eval("("+res+")");
					if(re.success){
						alert("提交成功！");
						$("#user-modal-1").modal('close');
					}else{
						if(re.isExist){
							alert("用户名已存在，请重新输入!");
						}
					};
				});
		  	}
		  	function getUserList(curr, cid) {
				$.getJSON("${pageContext.request.contextPath}/people/getPeopleList.action",
				{	//参数
					action: "getPeopleList.action",
					courseid: cid,
					page: curr || 1,//
					nums: 10,		//每页显示的条数
					item1Id:$("#item1Id").val(),
					item2Id:$("#item2Id").val(),
					item3Id:$("#item3Id").val(),
					ticketId:$("#ticketId").val(),
					itemTitle:$("#title").val(),
					createTimeStart:$("#createTimeStart").val(),
					createTimeEnd:$("#createTimeEnd").val()
				}, function (datajson) {
					//此处输出内容
			          var table = $("<table></table>");
			          table.attr({class:"am-table am-table-bd am-table-striped admin-content-table",id:"personListTable"});
			          var thead = $("<thead><tr><th>用户名</th><th>姓名</th><th>状态</th><th>创建时间</th><th>操作</th></tr></thead>");
			          table.append(thead);
			          var tbody = $("<tbody></tbody>");
			          tbody.attr({id:"content"});
			          if(datajson !=null){
			          	$(datajson.rows).each(function(n,Row){
			          		var tr = $("<tr></tr>");
			                    tr.append("<td><a href=\""+Row.userName+"\">"+ Row.userName + "</a></td>");
			                    tbody.append(tr);
			                    tr.append("<td>"+ Row.allName + "</td>");
			                    tbody.append(tr);
			                    var mm=Row.status;
			                  	if(mm==1){
	                            	tr.append("<td>使用中</td>");
	                            }else if(mm==11){
	                            	tr.append("<td>已报残</td>");
	                            }else{
	                            	tr.append("<td>启用</td>");
	                            }
			                    tbody.append(tr);
			                    tr.append("<td>"+ "2018-03-21" + "</td>");
			                    tbody.append(tr);
			                    tr.append("<button class=\"am-btn am-btn-default am-btn-xs am-text-secondary\" onclick=\"userOrgRolesEdit("+Row.userName+")\"><span class=\"am-icon-pencil-square-o\"></span> 编辑</button>");		                     
			                    tbody.append(tr); 
			          	});
			          };
			          table.append(tbody);
			          $("#userListTableDiv").empty();
			          $("#userListTableDiv").append(table);
			        // $("#log-list").innerHTML = table;userListTableDiv
			        //显示分页
			      });
	    		};
	    		function loadUserOrgRoles(userName){
	    			alert("loading user : "+userName);
	    		}
	    		function userOrgRolesEdit(userName){
	    			alert("loading user : "+userName);
	    			$("#userName").val(userName);
	    			//$("#allName").val(allName);
	    			initCompany();
	    			initRoles();
	    			loadUserOrgRoleTable();
	    			loadUserOrgTable();
	    		}
	    		getUserList(0,1);
	    		///////////////////////////////////////////////////////
	    		function initCompany(){
				$("#orgCompanyId").empty();
				$.post("${pageContext.request.contextPath}/organization/orgGetCompany.action",null,function(data){
					//var data = eval("("+data+")");
					if(data !=null){
        				data = $.parseJSON(data); 
						$(data.rows).each(function(n,Row){
							console.log(Row.orgCompany + " - " + Row.orgCompanyId);
							$("#orgCompanyId").append( "<option value=\""+ Row.orgCompanyId +"\">"+ Row.orgCompany +"</option>" );
		             		//$("#item3Id").append( "<option value=\""+ Row.level3Code +"\">"+ Row.level3Name +"</option>" );
					    })
					}else{
						if(re.isExist){
							alert("数据加载失败。。。");
						}
					};
				});
			}
			function initDepartment(){
				$("#orgDepartmentId").empty();
				var companyName = $('#orgCompanyId option:selected').text();
				var companyId = $('#orgCompanyId option:selected').val();
				$.post("${pageContext.request.contextPath}/organization/orgGetDepartment.action",{companyName:companyName,companyId:companyId},function(data){
					//var data = eval("("+data+")");
					if(data !=null){
        				data = $.parseJSON(data); 
						$(data.rows).each(function(n,Row){
							console.log(Row.orgCompany + " - " + Row.orgCompanyId);
							$("#orgDepartmentId").append( "<option value=\""+ Row.orgDepartmentId +"\">"+ Row.orgDepartment +"</option>" );
		             		//$("#item3Id").append( "<option value=\""+ Row.level3Code +"\">"+ Row.level3Name +"</option>" );
					    })
					}else{
						if(re.isExist){
							alert("数据加载失败。。。");
						}
					};
				});
			}
			function initOffice(){
				$("#orgOfficeId").empty();
				var companyName = $('#orgCompanyId option:selected').text();
				var companyId = $('#orgCompanyId option:selected').val();
				var departmentName = $('#orgDepartmentId option:selected').text();
				var departmentId = $('#orgDepartmentId option:selected').val();
				$.post("${pageContext.request.contextPath}/organization/orgGetOffice.action",{companyName:companyName,companyId:companyId,departmentName:departmentName,departmentId:departmentId},function(data){
					//var data = eval("("+data+")");
					if(data !=null){
        				data = $.parseJSON(data); 
						$(data.rows).each(function(n,Row){
							console.log(Row.orgCompany + " - " + Row.orgCompanyId);
							$("#orgOfficeId").append( "<option value=\""+ Row.orgOfficeId +"\">"+ Row.orgOffice +"</option>" );
		             		//$("#item3Id").append( "<option value=\""+ Row.level3Code +"\">"+ Row.level3Name +"</option>" );
					    })
					}else{
						if(re.isExist){
							alert("数据加载失败。。。");
						}
					};
				});
			}
			function initGroup(){
				$("#orgGroupId").empty();
				var companyName = $('#orgCompanyId option:selected').text();
				var companyId = $('#orgCompanyId option:selected').val();
				var departmentName = $('#orgDepartmentId option:selected').text();
				var departmentId = $('#orgDepartmentId option:selected').val();
				var officeName = $('#orgOfficeId option:selected').text();
				var officeId = $('#orgOfficeId option:selected').val();
				$.post("${pageContext.request.contextPath}/organization/orgGetGroup.action",{companyName:companyName,companyId:companyId,departmentName:departmentName,departmentId:departmentId,officeName:officeName,officeId:officeId},function(data){
					//var data = eval("("+data+")");
					if(data !=null){
        				data = $.parseJSON(data); 
						$(data.rows).each(function(n,Row){
							console.log(Row.orgCompany + " - " + Row.orgCompanyId);
							$("#orgGroupId").append( "<option value=\""+ Row.orgGroupId +"\">"+ Row.orgGroup +"</option>" );
		             		//$("#item3Id").append( "<option value=\""+ Row.level3Code +"\">"+ Row.level3Name +"</option>" );
					    })
					}else{
						if(re.isExist){
							alert("数据加载失败。。。");
						}
					};
				});
			}
			function initRoles(){
				$("#rolesId").empty();
				$("#rolesId").append( "<option value=\"" +"\" selected>"+ "--角色选择--" +"</option>" );
				$.post("${pageContext.request.contextPath}/role/rolesGet.action",null,function(data){
					//var data = eval("("+data+")");
					if(data !=null){
        				data = $.parseJSON(data); 
						$(data.rows).each(function(n,Row){
							console.log(Row.rolesName + " - " + Row.rolesId);
							$("#rolesId").append( "<option value=\""+ Row.rolesId +"\">"+ Row.rolesName +"</option>" );
					    })
					}else{
						alert("数据加载失败。。。");
					};
				});
			}
			//////////////////////////////////////////////
			function loadUserOrgTable(){
				$.getJSON("${pageContext.request.contextPath}/people/getUserOrgTable.action",
				{	//参数
					action: "getUserOrgTable.action",
					courseid: 1,
					page: 0 || 1,//
					nums: 10,		//每页显示的条数
					userName:$("#userName").val(),
					createTimeEnd:$("#createTimeEnd").val()
				}, function (datajson) {
					//此处输出内容
			          var table = $("<table></table>");
			          table.attr({class:"am-table am-table-bd am-table-striped admin-content-table",id:"personListTable"});
			          var thead = $("<thead><tr><th>用户名</th><th>登录名</th><th>单位</th><th>部门</th><th>科室</th><th>群组</th></tr></thead>");
			          table.append(thead);
			          var tbody = $("<tbody></tbody>");
			          tbody.attr({id:"content"});
			          if(datajson !=null){
			          	$(datajson.rows).each(function(n,Row){
			          		var tr = $("<tr></tr>");
			                    tr.append("<td>"+ Row.userName + "</td>");
			                    tbody.append(tr);
			                    tr.append("<td>"+ Row.allName + "</td>");
			                    tbody.append(tr);
			                    tr.append("<td>"+ Row.orgCompany + "</td>");
			                    tbody.append(tr);
			                    tr.append("<td>"+ Row.orgDepartment + "</td>");
			                    tbody.append(tr);
			                    tr.append("<td>"+ Row.orgOffice + "</td>");
			                    tbody.append(tr);
			                    tr.append("<td>"+ Row.orgGroup + "</td>");
			                    tbody.append(tr);
			                    var mm=Row.status;
			                  	if(mm==1){
	                            	tr.append("<td>使用中</td>");
	                            }else if(mm==11){
	                            	tr.append("<td>已报残</td>");
	                            }else{
	                            	tr.append("<td>启用</td>");
	                            }
			                    tbody.append(tr);
			                    tr.append("<td>"+ "2018-03-21" + "</td>");
			                    tbody.append(tr);
			                    tr.append("<button class=\"am-btn am-btn-default am-btn-xs am-text-secondary\" onclick=\"userOrgRolesEdit("+Row.userName+","+Row.allName+")\"><span class=\"am-icon-pencil-square-o\"></span> 编辑</button>");		                     
			                    tbody.append(tr); 
			          	});
			          };
			          table.append(tbody);
			          $("#userOrgList").empty();
			          $("#userOrgList").append(table);
			        // $("#log-list").innerHTML = table;userListTableDiv
			        //显示分页
			      });
			}
			function loadUserOrgRoleTable(){
				$.getJSON("${pageContext.request.contextPath}/people/getUserOrgRoleTable.action",
				{	//参数
					action: "getUserOrgRoleTable.action",
					courseid: 1,
					page: 0 || 1,//
					nums: 10,		//每页显示的条数
					userName:$("#userName").val(),
					createTimeEnd:$("#createTimeEnd").val()
				}, function (datajson) {
					//此处输出内容
			          var table = $("<table></table>");
			          table.attr({class:"am-table am-table-bd am-table-striped admin-content-table",id:"personListTable"});
			          var thead = $("<thead><tr>姓名<th></th><th>用户名</th><th>单位</th><th>科室</th><th>群组</th><th>组</th><th>角色</th><th>角色Id</th><th>状态</th><th>操作</th></tr></thead>");
			          table.append(thead);
			          var tbody = $("<tbody></tbody>");
			          tbody.attr({id:"content"});
			          if(datajson !=null){
			          	$(datajson.rows).each(function(n,Row){
			          		var tr = $("<tr></tr>");
			                    tr.append("<td>"+ Row.userName + "</td>");
			                    tbody.append(tr);
			                    tr.append("<td>"+ Row.allName + "</td>");
			                    tbody.append(tr);
			                    tr.append("<td>"+ Row.orgCompany + "</td>");
			                    tbody.append(tr);
			                    tr.append("<td>"+ Row.orgDepartment + "</td>");
			                    tbody.append(tr);
			                    tr.append("<td>"+ Row.orgOffice + "</td>");
			                    tbody.append(tr);
			                    tr.append("<td>"+ Row.orgGroup + "</td>");
			                    tbody.append(tr);
			                    tr.append("<td>"+ Row.rolesName + "</td>");
			                    tbody.append(tr);
			                    tr.append("<td>"+ Row.rolesId + "</td>");
			                    tbody.append(tr);
			                    var mm=Row.status;
			                  	if(mm==1){
	                            	tr.append("<td>使用中</td>");
	                            }else if(mm==11){
	                            	tr.append("<td>已报残</td>");
	                            }else{
	                            	tr.append("<td>启用</td>");
	                            }
			                    tbody.append(tr);
			                    tr.append("<button class=\"am-btn am-btn-default am-btn-xs am-text-secondary\" onclick=\"userOrgRolesEdit("+Row.userName+","+Row.allName+")\"><span class=\"am-icon-pencil-square-o\"></span> 编辑</button>");		                     
			                    tbody.append(tr); 
			          	});
			          };
			          table.append(tbody);
			          $("#userOrgRoleList").empty();
			          $("#userOrgRoleList").append(table);
			        // $("#log-list").innerHTML = table;userListTableDiv
			        //显示分页
			      });
			}
		</script>
	</body>
</html>
